SamplerState splr0 : register(s0);
Texture2D<float> tex0 : register(t0);

struct PSINPUT
{
	float4 pos : SV_Position;
	float4 color : COLOR;
	float2 coord : TEXCOORD;
	float4 clip : CLIPDISTANCE;
};

float4 PS(PSINPUT i) : SV_Target
{
	clip(i.clip);

	float a = tex0.Sample(splr0, i.coord);

	if (a == 0.0f)
		discard;

	return (a * i.color.a) * float4(i.color.rgb, 1.0f);
}
